package com.system.provider;

import com.am.ui.grid.AbstractBaseGridProvider;
import com.system.uitls.SearchFilter;
import java.util.Map;

public class PatientRecordListProvider extends AbstractBaseGridProvider
{
  public String generateSql(Map<String, Object> map)
  {
    StringBuffer sql = new StringBuffer("SELECT t1.id,t1.person_name,t1.user_name,t1.person_campus,t1.create_time,REPLACE(t2.description,'||','  ') as description FROM sys_patient_record t1,sys_diagnose t2 WHERE 1=1 AND t1.id=t2.record_id");

    sql.append(SearchFilter.getSearchSql(map, null));

    sql.append(" ORDER BY create_time DESC");
    setParamMap(map);
    return sql.toString();
  }
}